<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            font-size: 20px;
            width: 0;
            height: 30px;
            background-color: pink;
            animation: w 4s steps(6) forwards;
            overflow: hidden;
        }

        @keyframes w {
            0% {
                width: 0;
            }

            100% {
                width: 120px;
            }
        }
    </style>
</head>

<body>
    <div>我讨厌张欣怡</div>
</body>

</html>